package com.haoshuang.zhouzhoubang.ui.page.study.train.child

import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemTrainLabelBinding
import com.haoshuang.zhouzhoubang.model.bean.TrainLabelBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter


/**
 * 培训顶部标签适配器
 */
class TrainLabelAdapter(data: MutableList<TrainLabelBean>) : BaseBindingQuickAdapter<TrainLabelBean, ItemTrainLabelBinding>(data) {

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: TrainLabelBean?) {
        holder.getViewBinding<ItemTrainLabelBinding>().apply {
            tvTrainingText.isSelected = item?.isCheck == 1
            tvTrainingText.text = item?.name
        }
    }

}